<?php

/* 
 * @author:Tham
 * Connect Booking Flight and Deal
 */
class DealFlightBooking {

    public static function getAllMangerBooking () 
    {
          global $wpdb;
          $sql ="SELECT count(`deal_flight_booking_id`) as total_booking  FROM `travel_deal_flight_booking`  ";
          $aDesign = $wpdb->get_results($sql);
          return $aDesign;
    }
    public static function getAllMangerBookingLimit ($start,$limit) 
    {
          global $wpdb;
          $sql ="SELECT * "
            . "  FROM `travel_deal_flight_booking`"
            . "  LIMIT ".$start." , ".$limit;
          $listbooking = $wpdb->get_results($sql);
          return $listbooking;
    }
   public static function  DeleteBooking($id)
   {
       global $wpdb;
       $sql = 'DELETE FROM `travel_deal_flight_booking`'
               . '  WHERE `deal_flight_booking_id` = '.$id;
        $wpdb->query($sql);
     
   }
}

